#ifndef FTPPUTFILE_H
#define FTPPUTFILE_H

#include <QObject>
#include <QFile>
#include <QByteArray>
#include <QFtp>


class FtpGet : public QObject
{
    Q_OBJECT

    public:
        FtpGet(QObject *parent = 0);

        bool putFile(const QString &url);


    signals:
        void done();
        //void commandFinished(int id, bool error);

    private slots:
        void ftpDone(bool error);
        void ftpListInfo(const QUrlInfo &url);
        void ftpCommandFinished(int id, bool error);

    private:
        bool justputFile(void);
        int mkdirId;
        int  dirIsExist;
        QFtp ftp;
        QFile file;
        QByteArray filebuffer;
};

#endif // FTPPUTFILE_H
